package com.shum1n.gmall;

import com.shum1n.gmall.service.OrderService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class ConsumerApplicatoin {
    public static void main( String[] args ) throws IOException {
        //加载xml配置文件启动
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
        OrderService bean = context.getBean(OrderService.class);
        bean.initOrder("1");
        System.out.println("调用完成");
        System.in.read(); // 按任意键退出
    }
}
